import { defineUserConfig } from "vuepress";
import { searchProPlugin } from "vuepress-plugin-search-pro";
import theme from "./theme.js";

export default defineUserConfig({
  base: "/javastar/",
  plugins: [
    // 集成搜索框
    searchProPlugin({
      appId:"PSY4DY2P7V",
      apiKey:"e22b790dbffe4f738e0ca9dd69f28103",
      indexName:"erlangha-gitee",
      hotKeys:[],
      // 索引全部内容
      indexContent: true,
      // 为分类和标签添加索引
      customFields: [
        {
          getter: (page) => page.frontmatter.category,
          formatter: "分类：$content",
        },
        {
          getter: (page) => page.frontmatter.tag,
          formatter: "标签：$content",
        },
      ]
    })
  ],
  locales: {
    "/": {
      lang: "zh-CN",
      title: "JavaStar",
      description: "A blog for vuepress-theme-hope",
    }
  },

  theme,

  // Enable it with pwa
  // shouldPrefetch: false,
});

